onError

open fun onError(@NonNull() action: Expected.Action<E>): Expected<E, V>

Execute an action if this expected is an error.

Return

this expected, unchanged

Parameters

action

Function handling the case when error is present.